﻿using System;

namespace UtilZ.Dotnet.WindowsDesktopEx.Winform
{
    /// <summary>
    /// 通知项
    /// </summary>
    public class NotifyItem
    {
        /// <summary>
        /// 显示时长,单位:毫秒
        /// </summary>
        public long Duration { get; set; } = 5000;

        /// <summary>
        /// 背景颜色,当BackgroundImage为null时使用
        /// </summary>
        public System.Drawing.Color BackgroundColor { get; set; } = System.Drawing.Color.White;

        /// <summary>
        /// 背景图片,当不为null时使用
        /// </summary>
        public System.Drawing.Image BackgroundImage { get; set; } = null;

        /// <summary>
        /// 背景图片布局类型,当BackgroundImage不为null时使用
        /// </summary>
        public System.Windows.Forms.ImageLayout BackgroundImageLayout { get; set; } = System.Windows.Forms.ImageLayout.Stretch;

        /// <summary>
        /// 通知框大小,当不为null时使用
        /// </summary>
        public System.Drawing.Size? Size { get; set; } = null;

        /// <summary>
        /// 消息图片
        /// </summary>
        public System.Drawing.Image MesageImage { get; set; } = null;

        /// <summary>
        /// 文本信息
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 关联的数据标记
        /// </summary>
        public object Tag { get; set; }


        /// <summary>
        /// 触发鼠标单击事件
        /// </summary>
        public Action<NotifyItem> MouseClick;

        /// <summary>
        /// 通知关闭事件
        /// </summary>
        public Action<NotifyItem> Closed;

        /// <summary>
        /// 构造函数初始化
        /// </summary>
        public NotifyItem()
        {

        }

    }
}
